package com.jalarbee.web.jsf.controller;

import com.jalarbee.core.bootik.client.business.Client;
import com.jalarbee.core.bootik.client.service.ClientService;

public class ClientController {

	private ClientService clientService;
	
	private ClientsController clients;
	
	private Client client;

	public ClientController() {
	}

	public void setClientService(ClientService clientService) {
		this.clientService = clientService;
	}

	public ClientsController getClients() {
		return clients;
	}

	public void setClients(ClientsController clients) {
		this.clients = clients;
	}

	public Client getClient() {
		return client;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	public String addClient() {
		try {
				clientService.create(client);
				return Navigation.SUCCESS;
		} catch (Exception e) {
			return Navigation.ERROR;
		}
	}
}